import 'package:school_assistant/generated/json/base/json_convert_content.dart';
import 'package:school_assistant/data/goods_entity.dart';

GoodsEntity $GoodsEntityFromJson(Map<String, dynamic> json) {
	final GoodsEntity goodsEntity = GoodsEntity();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		goodsEntity.id = id;
	}
	final int? category = jsonConvert.convert<int>(json['category']);
	if (category != null) {
		goodsEntity.category = category;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		goodsEntity.name = name;
	}
	final double? price = jsonConvert.convert<double>(json['price']);
	if (price != null) {
		goodsEntity.price = price;
	}
	final String? image = jsonConvert.convert<String>(json['image']);
	if (image != null) {
		goodsEntity.image = image;
	}
	final String? extra = jsonConvert.convert<String>(json['extra']);
	if (extra != null) {
		goodsEntity.extra = extra;
	}
	return goodsEntity;
}

Map<String, dynamic> $GoodsEntityToJson(GoodsEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['category'] = entity.category;
	data['name'] = entity.name;
	data['price'] = entity.price;
	data['image'] = entity.image;
	data['extra'] = entity.extra;
	return data;
}